package entity

import (
	"shqsoft.cn/pas3ui/base"
)

type Organ struct {
	ID            int    `gorm:"primary_key;column:ID"`
	OrganID       string `gorm:"column:OrganID"`
	OrganName     string `gorm:"column:OrganName"`
	Description   string `gorm:"column:Description"`
	ParentOrganID int    `gorm:"column:ParentOrganID"`
	OrderKey      string `gorm:"column:OrderKey"`
}

//TableName Role 角色表名
func (Organ) TableName() string {
	return "T_Organization"
}

func OrganEF() base.EntityFunc {
	return func() interface{} {
		entity := Organ{}
		return &entity
	}
}
func OrganESF() base.EntitiesFunc {
	return func() interface{} {
		var entities []Organ
		return &entities
	}
}

func init() {
	base.DaoPoolObj.Put("Organ", base.NewDefaultDao(OrganEF(), OrganESF(), nil, "my"))
}
